package lyq.spec.edu.week12_home01;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;

public class ActivityFirst extends AppCompatActivity {

    private List<Wechat> wechatList = new ArrayList<Wechat>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_first);
        initwechats(); // 初始化微信数据
        initwechats(); // 初始化微信数据
        WeChatAdapter adapter = new WeChatAdapter(ActivityFirst.this, R.layout.wechat_first, wechatList);

        ListView listView = (ListView) findViewById(R.id.list_view);

        listView.setAdapter(adapter);
    }




        private void initwechats() {

            Wechat one1 = new Wechat("订阅号信息","小新说车:什么是小众的豪华，这俩车能回答", R.drawable.a);

            wechatList.add(one1);

            Wechat one2 = new Wechat("指云端","这个秋冬他们相继离世,癌症究竟是怎样摧...", R.drawable.c);

            wechatList.add(one2);

            Wechat one3 = new Wechat("微信收款助手","微信收款支付4.00元", R.drawable.d);

            wechatList.add(one3);

            Wechat one4 = new Wechat("金大师为民服务","机构师说:[语音]", R.drawable.e);

            wechatList.add(one4);

            Wechat one5 = new Wechat("春晖花园客户服务中心","[10条]春晖花园客户服务中心:@3_1_903水 有", R.drawable.f);

            wechatList.add(one5);

            Wechat one6 = new Wechat("H161 师晨冰 涨价逻辑交流群","Aa严师高级助理-小胡 (胡文涛):[太阳]...", R.drawable.g);

            wechatList.add(one6);

            Wechat one7 = new Wechat("微信团队","登录操作通知", R.drawable.h);

            wechatList.add(one7);




        }

    }
